-- GENERATED SPELL FOR [Underbog Mushroom] --


function spell0_17990(pUnit, Event) --@Spore Cloud,Self--
pUnit:FullCastSpellOnTarget(31689,pUnit)
pUnit:RegisterEvent('Sorts_17990', 20000, 1)
end

function spell1_17990(pUnit, Event) --@Spore Cloud,Self--
pUnit:FullCastSpellOnTarget(34168,pUnit)
pUnit:RegisterEvent('Sorts_17990', 20000, 1)
end

function Sorts_17990(pUnit, Event)
local choix_sorts_17990 = math.random(0, 1)
if choix_sorts_17990 == 0 then
pUnit:RegisterEvent('spell0_17990', 1, 1)
end
if choix_sorts_17990 == 1 then
pUnit:RegisterEvent('spell1_17990', 1, 1)
end
end

function mob17990_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17990', math.random(1500, 3000), 1)
end

function mob17990_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17990_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17990_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17990, 1, 'mob17990_Action')
RegisterUnitEvent(17990, 2, 'mob17990_Leave')
RegisterUnitEvent(17990, 3, 'mob17990_Kill')
RegisterUnitEvent(17990, 4, 'mob17990_Die')
